package com.allprs.hmcs.controller;

import com.allprs.common.core.controller.BaseController;
import com.allprs.common.core.domain.AjaxResult;
import com.allprs.common.core.page.TableDataInfo;
import com.allprs.hmcs.entity.HyParking;
import com.allprs.hmcs.enums.NaturalTypeEnum;
import com.allprs.hmcs.pojo.reqBo.*;
import com.allprs.hmcs.pojo.resBo.BaseMap;
import com.allprs.hmcs.pojo.resBo.NameSelectRes;
import com.allprs.hmcs.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author wjf
 * @描述: 地下空间一张图
 * @date 2024年01月16日
 * @version: 1.0
 */

@RestController
@RequestMapping("/parkinglot")
@Api(tags = "驾驶舱-停车场")
@Slf4j
public class ParkingLotContorller extends BaseController {

    @Resource
    private IParkingLotService parkingLotService;


    @ApiOperation(value = "查询停车场列表(支持分页)")
    @GetMapping("/getParkingLotList")
    public TableDataInfo getParkingLotList(ParkingLotQueryBo queryBo){
        startPage();
        List<HyParking> list = parkingLotService.getParkingLotList(queryBo);

        return getDataTable(list);
    }


    @ApiOperation(value = "查询管廊详情")
    @GetMapping("/getPipeCorridorInfo")
    public AjaxResult getPipeCorridorInfo(PipeCorridorQueryBo queryBo){

        return parkingLotService.getPipeCorridorInfo(queryBo);
    }


}
